package com.coldchain.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author fangliai
 * @since 2018-11-14
 */
@TableName("ch_order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单号(最大支持32位)
     */
    @TableId(value = "orderId",type = IdType.UUID)
    private String orderId;

    /**
     * 企业Id
     */
    @TableField("companyId")
    private String companyId;


    /**
     * 业务类型
     */
    @TableField("bizType")
    private Integer bizType;

    /**
     * 第三方支付订单号
     */
    @TableField("transactionId")
    private String transactionId;

    /**
     * 支付金额
     */
    private BigDecimal paymoney;

    /**
     * 管理费
     */
    @TableField("keeperMoney")
    private BigDecimal keeperMoney;

    /**
     * 订单金额
     */
    private BigDecimal price;

    /**
     * 订单标题
     */
    private String title;

    /**
     * 订单内容
     */
    private String content;

    /**
     * 货币单位 (默认为RMB)
     */
    @TableField("priceUnit")
    private String priceUnit;

    /**
     * 来源 1:微信 2:支付宝;3银行卡
     */
    private Integer channel;

    /**
     * 最后一次退款ID
     */
    @TableField("refundId")
    private String refundId;

    /**
     * 错误代码
     */
    @TableField("errCode")
    private String errCode;

    /**
     * 错误代码描述
     */
    private String message;

    /**
     * 业务结果  SUCCESS/FAIL
     */
    @TableField("resultCode")
    private String resultCode;

    /**
     * 订单开始时间
     */
    @TableField("startTime")
    private Date startTime;

    /**
     * 订单完成时间
     */
    @TableField("endTime")
    private Date endTime;

    /**
     * 订单状态 0 待支付 1.已完成  2.异常 -1已取消
     */
    @TableField("payStatus")
    private Integer payStatus;

    /**
     * 结算日期
     */
    @TableField("settlementTime")
    private Date settlementTime;

    /**
     * 结算状态(1已结算 0未结算)
     */
    @TableField("settlementCode")
    private Integer settlementCode;

    /**
     * 乐观锁
     */
    private Integer version;

    /**
     * 创建时间
     */
    @TableField("createTime")
    private Date createTime;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }



    public Integer getBizType() {
        return bizType;
    }

    public void setBizType(Integer bizType) {
        this.bizType = bizType;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public BigDecimal getPaymoney() {
        return paymoney;
    }

    public void setPaymoney(BigDecimal paymoney) {
        this.paymoney = paymoney;
    }

    public BigDecimal getKeeperMoney() {
        return keeperMoney;
    }

    public void setKeeperMoney(BigDecimal keeperMoney) {
        this.keeperMoney = keeperMoney;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(String priceUnit) {
        this.priceUnit = priceUnit;
    }

    public Integer getChannel() {
        return channel;
    }

    public void setChannel(Integer channel) {
        this.channel = channel;
    }

    public String getRefundId() {
        return refundId;
    }

    public void setRefundId(String refundId) {
        this.refundId = refundId;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public Date getSettlementTime() {
        return settlementTime;
    }

    public void setSettlementTime(Date settlementTime) {
        this.settlementTime = settlementTime;
    }

    public Integer getSettlementCode() {
        return settlementCode;
    }

    public void setSettlementCode(Integer settlementCode) {
        this.settlementCode = settlementCode;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
